﻿import Localization from '../../lib/js/vue.localization';
import Util from '../../lib/js/vue.util';

var _groupName = "AbpIdentity";

var L = Localization.l;

export default {
    init({ store }) {
        Localization.init({ store });
        console.log(L);
        Util.init({ store });
    },
    getMenus() {
        var _group = {
            id: 'AbpIdentity',
            title: L(_groupName + '.Menu:IdentityManagement'),
            icon: 'el-icon-s-tools',
            children: []
        };

        if (Util.checkAuth('AbpIdentity.Roles')) {
            _group.children.push({
                id: 'AbpIdentity.Roles',
                title: L(_groupName + '.Roles'),
                url: '/Identity/Roles'
            });
        }

        if (Util.checkAuth('AbpIdentity.Roles')) {
            _group.children.push({
                id: 'AbpIdentity.Users',
                title: L(_groupName + '.Users'),
                url: '/Identity/Users'
            });
        }
        return _group;
    }
}